<!DOCTYPE html>
<html>
	<head>
		<title></title>
		<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.2r1/build/fonts/fonts-min.css" />
		<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.2r1/build/datatable/assets/skins/sam/datatable.css" />
		<script type="text/javascript" src="http://yui.yahooapis.com/2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
		<script type="text/javascript" src="http://yui.yahooapis.com/2.8.2r1/build/dragdrop/dragdrop-min.js"></script>
		<script type="text/javascript" src="http://yui.yahooapis.com/2.8.2r1/build/element/element-min.js"></script>
		<script type="text/javascript" src="http://yui.yahooapis.com/2.8.2r1/build/datasource/datasource-min.js"></script>
		<script type="text/javascript" src="http://yui.yahooapis.com/2.8.2r1/build/datatable/datatable-min.js"></script>
		<script src="http://yui.yahooapis.com/2.8.2r1/build/yahoo/yahoo.js"></script>
		<script src="http://yui.yahooapis.com/2.8.2r1/build/profiler/profiler-min.js"></script>
	</head>
	<body class="yui-skin-sam">

		<div id="basic"></div>
		<div id="basic2"></div>







		<script>
		var large = [];
		for (i=0; i<1000; i++) {
			large[i] = {a: i+1, b:i+2, c:i+3, d: i+4, e: i+5, f: i+6, g:i+7};
		}

		YAHOO.util.Event.addListener(window, "load", function() {
		    YAHOO.example.Basic = function() {
		        var myColumnDefs = [
		            {key:"a"},
		            {key:"b"},
		            {key:"c"},
		            {key:"d"},
		            {key:"e"},
					{key:"f"},
					{key:"g"}
		        ];

		        var myDataSource = new YAHOO.util.DataSource(large);
		        myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
		        myDataSource.responseSchema = {
		            fields: ["a","b","c","d","e", "f", "g"]
		        };

				var myDataTable = {};
				YAHOO.tool.Profiler.registerObject("myDataTable", myDataTable);
		        myDataTable = new YAHOO.widget.DataTable("basic",
		                myColumnDefs, myDataSource, {caption:"DataTable Caption"});

				var report = YAHOO.tool.Profiler.getFullReport();
				YAHOO.log(report);
				YAHOO.tool.Profiler.unregisterObject("myDataTable");

		        return {
		            oDS: myDataSource,
		            oDT: myDataTable
		        };
		    }();
		});
		</script>
	</body>
</html>
